const attention = {
    state: {
        list: [],
        show: false,
    },
    mutations: {
        GETattention(state, item) {
            state.list = [...item]
            if (state.list.length === 0) {
                state.show = true
            }
            if (state.list.length != 0) {
                state.show = false
            }
        }
    },
    actions: {
        GETattention(context) {
            this.$http.collects({
                page: 1,
                limit: 10,
                type: 2
            }).then(res => {
                console.log(res)

                context.commit('GETattention', res.data.data.list)
            })


        },
        Qxattention(context, id) {
            this.$http.cancelCollect(`${id}/2`).then(res => {
                console.log(res)
            })
        }
    },
    modules: {}
}

export default attention